|
Posizione nel menu |
---|
Mesh → Taglio → Sezione da mesh e piano |
Ambiente |
Mesh |
Avvio veloce |
Nessuno |
Introdotto nella versione |
- |
Vedere anche |
Sezioni |
Il comando Sezione da mesh e piano crea una sezione trasversale attraverso un oggetto mesh. La sezione trasversale è una Part Feature.
Vedere: Funzioni Part.
See also: FreeCAD Scripting Basics.
To section a mesh use its section
method. The method requires a second mesh object that need not be planar.
import FreeCAD as App
import Mesh
import Part
# Create a non-parametric box-shaped mesh:
msh = App.ActiveDocument.addObject("Mesh::Feature", "Mesh")
msh.Mesh = Mesh.createBox(30, 40, 50)
msh.ViewObject.DisplayMode = "Flat Lines"
# Create a planar mesh from 3 points:
p1 = App.Vector(-20, -60, 0)
p2 = App.Vector(65, 25, 0)
p3 = App.Vector(-20, 25, 0)
msh_plane = Mesh.Mesh([p1, p2, p3])
# Find the section loops (each loop is a list of points):
loops = msh.Mesh.section(msh_plane)
# Show the loop polygon:
Part.show(Part.makePolygon(loops[0]))